﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Register
</asp:Content>
<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Create a New Account</h2>
    <p>
        Use the form below to create a new account.
    </p>
    <%= Html.ValidationSummary("Account creation was unsuccessful. Please correct the errors and try again.") %>
    <% using (Html.BeginForm())
       { %>
    <table>
        <tr>
            <td>
                User name:
            </td>
            <td>
                <%: Html.TextBox("username") %>
                <%: Html.ValidationMessage("username") %>
            </td>
        </tr>
        <tr>
            <td>
                Email:
            </td>
            <td>
                <%: Html.TextBox("email") %>
                <%: Html.ValidationMessage("email") %>
            </td>
        </tr>
        <% if (string.IsNullOrEmpty((string)Session["LiveId"]))
           { %>
        <tr>
            <td>
                Password:
            </td>
            <td>
                <%: Html.Password("password")%>
                 <%: Html.ValidationMessage("password") %>
            </td>
        </tr>
        <tr>
            <td>
                Confirm password:
            </td>
            <td>
                <%: Html.Password("confirmPassword")%>
                 <%: Html.ValidationMessage("confirmPassword") %>
            </td>
        </tr>
     <% } %>
    </table>
    <p>
        <input type="submit" value="Register" />
        <a href="/Account/Cancel">Cancel</a>
    </p>
    <% } %>
</asp:Content>
